<@dwz.pagerForm action="management/security/user/list" page=userPage>
	<input type="hidden" name="username" value="${username!''}"/>
	<input type="hidden" name="realname" value="${realname!''}"/>
	<input type="hidden" name="status" value="${status!''}"/>
</@dwz.pagerForm>
<@dwz.search_form action="management/security/user/list">
	<@dwz.label_input2 content="登录名称：">
		<input type="text" name="username" value="${username!''}"/>
	</@dwz.label_input2>
	<@dwz.label_input2 content="真实姓名：">
		<input type="text" name="realname" value="${realname!''}"/>
	</@dwz.label_input2>
	<@dwz.label_input2 content="账户状态：">
	<select name="status">
		<#if status==''>
			<option value="" selected>所有</option>
			<option value="enabled">可用</option>
			<option value="disabled">禁用</option>
		<#elseif status=='enabled'>
			<option value="">所有</option>
			<option value="enabled" selected>可用</option>
			<option value="disabled">禁用</option>
		<#elseif status=='disabled'>
			<option value="">所有</option>
			<option value="enabled">可用</option>
			<option value="disabled" selected>禁用</option>
		</#if>
	</select>
	</@dwz.label_input2>
</@dwz.search_form>

<@dwz.layout_content>
	<@dwz.tool_bar>
		<@dwz.tool_button content="添加用户" class="user_add" rel="lookup2organization_add" width="530" height="330" href="management/security/user/create"/>
		<@dwz.tool_button content="编辑用户" class="user_edit" rel="lookup2organization_edit" width="530" height="330" href="management/security/user/update/{slt_uid}"/>
		<@dwz.tool_button content="删除用户" class="user_delete" target="ajaxTodo" callback="navTabAjax" href="management/security/user/delete/{slt_uid}" title="确认要删除该用户?"/>
		<@dwz.tool_button content="更新状态" class="user_go" target="ajaxTodo" callback="navTabAjax" href="management/security/user/status/{slt_uid}" title="确认更改用户状态?"/>
	</@dwz.tool_bar>
	
	<@dwz.table_common layoutH="138">
		<thead>
			<tr>
				<th width="100">登录名称</th>
				<th width="100">真实名字</th>
				<th width="200">邮箱地址</th>
				<th width="100">电话</th>
				<th width="150" orderField=organization.name >所在组织</th>
				<th width="150" >角色</th>
				<th width="100" orderField="status" >账户状态</th>
				<th orderField="createTime" >创建时间</th>
			</tr>
		</thead>
		<tbody>
			<#list userPage.getList() as item>
			<tr target="slt_uid" rel="${item.id}">
				<td>${item.username}</td>
				<td>${item.realname}</td>
				<td>${item.email!''}</td>
				<td>${item.phone!''}</td>
				<td>
					<#if item.organization?exists>
						${item.organization.name}
					</#if>
				</td>
				<td>
					<#list item.userRoles as ur>
						${ur.role.name }&nbsp;&nbsp;
					</#list>
				</td>
				<td>${(item.status == "enabled")?string("可用","不可用")}</td>
				<td>${item.create_time}</td>
			</tr>			
			</#list>
		</tbody>
	</@dwz.table_common>
	<!-- 分页 -->
	<@dwz.pagerBar page=userPage/>
</@dwz.layout_content>
